<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>用户列表</title>
    <link rel="stylesheet" href="/gzht/lib/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/gzht/lib/Hui-iconfont/1.0.8/iconfont.min.css" media="all">
    <style type="text/css">
        .search_input {
            width: 150px;
            height: 1.5rem;
            line-height: 1.5rem;
            border: 1px solid rgba(100, 100, 100, 0.5);
            outline: none;
            border-radius: 3px;
        }
    </style>
</head>
<body>
<input type="hidden" id="adminNo" value="${sessionScope.get('adminNo')}">
<%----%>
<div style="padding: 20px; background-color: #F2F2F2;">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md2">
            <div class="layui-card">
                <div class="layui-card-header">组织机构</div>
                <div class="layui-card-body">
                    <div id="department" class="demo-tree demo-tree-box"></div>
                </div>
            </div>
        </div>
        <div class="layui-col-md10">
            <div class="layui-card">
                <div class="layui-card-header">
                    <%--搜索栏--%>
                    <form id="searchForm">
                        <label>登录名称：</label>
                        <input type="text" name="adminLoginName" class="search_input">
                        <label>手机号码：</label>
                        <input type="text" name="adminPhone" class="search_input">
                        <label>用户状态：</label>
                        <select name="adminStatus" class="search_input" style="height: 1.7rem;line-height: 1.7rem;">
                            <option value="0">正常</option>
                            <option value="1">禁用</option>
                        </select>
                        <button type="button" class="layui-btn layui-btn-radius" style="height: 2rem;line-height: 2rem;margin-left: 1rem;" id="search"><i class="Hui-iconfont">&#xe709;</i>搜索</button>
                        <button type="button" class="layui-btn layui-btn-radius layui-btn-warm" id="search_reset" style="height: 2rem;line-height: 2rem;margin-left: 0.2rem;"><i class="Hui-iconfont">&#xe68f;</i>重置</button>
                    </form>
                </div>
                <div class="layui-card-body">
                    <%--表格头部工具栏--%>
                    <script type="text/html" id="tools">
                        <a type="button" class="layui-btn layui-btn-sm" href="/gzht/userAdd"><i class="layui-icon"></i>添加</a>
                        <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="h_edit">
                            <i class="layui-icon"></i>编辑
                        </button>
                        <button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="h_del">
                            <i class="layui-icon"></i>删除
                        </button>
                    </script>
                    <%--表格行内编辑工具栏--%>
                    <script type="text/html" id="row_tools">
                        <div class="layui-btn-group">
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="edit">
                                <i class="layui-icon">&#xe642;</i>
                            </button>
                            {{# if("110" == d.adminPartNo){ }}
                            <button type="button" class="layui-btn layui-btn-disabled layui-btn-sm">
                                <i class="layui-icon">&#xe640;</i>
                            </button>
                            {{# }else { }}
                            <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del">
                                <i class="layui-icon">&#xe640;</i>
                            </button>
                            {{# } }}
                            <button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="reset">
                                <i class="layui-icon">&#xe669;</i>
                            </button>
                        </div>
                    </script>
                    <%--表格内用户状态开关按钮--%>
                    <script type="text/html" id="switch">
                        {{# if("110"==(d.adminPartNo)){ }}
                        <input type="checkbox" data-adminNo="{{d.adminNo}}" disabled name="close" checked lay-skin="switch" lay-text="正常|禁用">
                        {{# }else { }}
                        {{#  if(d.adminStatus == 0){ }}
                        <input lay-filter="switchStatus" type="checkbox" data-adminNo="{{d.adminNo}}" name="close" checked lay-skin="switch" lay-text="正常|禁用">
                        {{#  } else if(d.adminStatus == 1){ }}
                        <input lay-filter="switchStatus" type="checkbox" data-adminNo="{{d.adminNo}}" name="close" lay-skin="switch" lay-text="正常|禁用">
                        {{#  } else { }}
                        <span class="layui-badge layui-bg-orange">异常</span>
                        {{# } }}
                        {{# } }}
                    </script>
                    <%--表格--%>
                    <table id="userList" lay-filter="userListTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/gzht/statics/js/jquery-1.12.2.min.js"></script>
<script src="/gzht/lib/layui/layui.js"></script>
<script src="/gzht/statics/utils/TreeUtil.js"></script>
<script src="/gzht/statics/js/userList/userList.js"></script>
</body>
</html>
